package com.bole.dao;

import com.bole.pojo.TbCarDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CarDao extends JpaRepository<TbCarDo,Long> {


    @Query(value = "SELECT*FROM tb_car where status=1 limit 6",nativeQuery = true)
    List<TbCarDo> findAllByStatus();

    TbCarDo findCarById(Long carId);

    List<TbCarDo> findAllBySellUserId(Long userId);
}
